package com.gitee.ayezs.AnnotationQueryWarpperDemo.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.gitee.ayezs.AnnotationQueryWarpperDemo.entity.User;
import com.gitee.ayezs.AnnotationQueryWarpperDemo.mapper.UserMapper;
import com.gitee.ayezs.AnnotationQueryWarpperDemo.service.IUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gitee.ayezs.AnnotationQueryWrapper;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author baomidou
 * @since 2022-01-02
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {
    public void test(){
        User user1 = new User();
        user1.setName("的");
        user1.setSex(1);
        user1.setAge(23);
        QueryWrapper<User> queryWrapper = new AnnotationQueryWrapper<>(user1);
        for (User user : baseMapper.selectList(queryWrapper)) {
            System.out.println(user);
        }
    }
}
